package hu.diploma.android.util;

import hu.diploma.common.enums.DataSubType;

import java.util.HashMap;

public class TypeEnumMapper {
	private static final HashMap<Integer, DataSubType> emailTypeMap = new HashMap<Integer, DataSubType>();
	private static final HashMap<Integer, DataSubType> phoneTypeMap = new HashMap<Integer, DataSubType>();
	private static final HashMap<Integer, DataSubType> addressTypeMap = new HashMap<Integer, DataSubType>();
	private static final HashMap<Integer, DataSubType> imTypeMap = new HashMap<Integer, DataSubType>();
	private static final HashMap<Integer, DataSubType> organizationTypeMap = new HashMap<Integer, DataSubType>();
	private static final HashMap<Integer, DataSubType> eventTypeMap = new HashMap<Integer, DataSubType>();
	private static final HashMap<Integer, DataSubType> webSiteTypeMap = new HashMap<Integer, DataSubType>();
	private static final HashMap<DataSubType, Integer> callsTypeMap = new HashMap<DataSubType, Integer>();

	private static final HashMap<DataSubType, Integer> emailEnumMap = new HashMap<DataSubType, Integer>();
	private static final HashMap<DataSubType, Integer> phoneEnumMap = new HashMap<DataSubType, Integer>();
	private static final HashMap<DataSubType, Integer> addressEnumMap = new HashMap<DataSubType, Integer>();
	private static final HashMap<DataSubType, Integer> imEnumMap = new HashMap<DataSubType, Integer>();
	private static final HashMap<DataSubType, Integer> organizationEnumMap = new HashMap<DataSubType, Integer>();
	private static final HashMap<DataSubType, Integer> eventEnumMap = new HashMap<DataSubType, Integer>();
	private static final HashMap<DataSubType, Integer> webSiteEnumMap = new HashMap<DataSubType, Integer>();
	private static final HashMap<DataSubType, Integer> callsEnumMap = new HashMap<DataSubType, Integer>();

	static {
		TypeEnumMapper.getPhoneTypeMap().put(19, DataSubType.PHONE_ASSISTANT);
		TypeEnumMapper.getPhoneTypeMap().put(4, DataSubType.PHONE_FAX_WORK);
		TypeEnumMapper.getPhoneTypeMap().put(1, DataSubType.PHONE_HOME);
		TypeEnumMapper.getPhoneTypeMap().put(2, DataSubType.PHONE_MOBILE);
		TypeEnumMapper.getPhoneTypeMap().put(7, DataSubType.PHONE_OTHER);
		TypeEnumMapper.getPhoneTypeMap().put(6, DataSubType.PHONE_PAGER);
		TypeEnumMapper.getPhoneTypeMap().put(3, DataSubType.PHONE_WORK);

		TypeEnumMapper.getEmailTypeMap().put(1, DataSubType.EMAIL_HOME);
		TypeEnumMapper.getEmailTypeMap().put(4, DataSubType.EMAIL_MOBILE);
		TypeEnumMapper.getEmailTypeMap().put(3, DataSubType.EMAIL_OTHER);
		TypeEnumMapper.getEmailTypeMap().put(2, DataSubType.EMAIL_WORK);

		TypeEnumMapper.getAddressTypeMap().put(1, DataSubType.ADDRESS_HOME);
		TypeEnumMapper.getAddressTypeMap().put(2, DataSubType.ADDRESS_WORK);
		TypeEnumMapper.getAddressTypeMap().put(3, DataSubType.ADDRESS_OTHER);

		TypeEnumMapper.getImTypeMap().put(0, DataSubType.IM_PROTOCOL_AIM);
		TypeEnumMapper.getImTypeMap().put(1, DataSubType.IM_PROTOCOL_MSN);
		TypeEnumMapper.getImTypeMap().put(2, DataSubType.IM_PROTOCOL_YAHOO);
		TypeEnumMapper.getImTypeMap().put(3, DataSubType.IM_PROTOCOL_SKYPE);
		TypeEnumMapper.getImTypeMap().put(4, DataSubType.IM_PROTOCOL_QQ);
		TypeEnumMapper.getImTypeMap().put(5, DataSubType.IM_PROTOCOL_GOOGLE_TALK);
		TypeEnumMapper.getImTypeMap().put(6, DataSubType.IM_PROTOCOL_ICQ);
		TypeEnumMapper.getImTypeMap().put(7, DataSubType.IM_PROTOCOL_JABBER);
		TypeEnumMapper.getImTypeMap().put(8, DataSubType.IM_PROTOCOL_NETMEETING);

		TypeEnumMapper.getOrganizationTypeMap().put(1, DataSubType.ORGANIZATION_WORK);
		TypeEnumMapper.getOrganizationTypeMap().put(2, DataSubType.ORGANIZATION_OTHER);

		TypeEnumMapper.getWebsiteTypeMap().put(1, DataSubType.WEBSITE_HOMEPAGE);
		TypeEnumMapper.getWebsiteTypeMap().put(2, DataSubType.WEBSITE_BLOG);
		TypeEnumMapper.getWebsiteTypeMap().put(3, DataSubType.WEBSITE_PROFILE);
		TypeEnumMapper.getWebsiteTypeMap().put(4, DataSubType.WEBSITE_HOME);
		TypeEnumMapper.getWebsiteTypeMap().put(5, DataSubType.WEBSITE_WORK);
		TypeEnumMapper.getWebsiteTypeMap().put(6, DataSubType.WEBSITE_FTP);
		TypeEnumMapper.getWebsiteTypeMap().put(7, DataSubType.WEBSITE_OTHER);

		TypeEnumMapper.getEventTypeMap().put(1, DataSubType.EVENT_ANNIVERSARY);
		TypeEnumMapper.getEventTypeMap().put(2, DataSubType.EVENT_OTHER);
		TypeEnumMapper.getEventTypeMap().put(3, DataSubType.EVENT_BIRTHDAY);

		TypeEnumMapper.getPhoneEnumMap().put(DataSubType.PHONE_ASSISTANT, 19);
		TypeEnumMapper.getPhoneEnumMap().put(DataSubType.PHONE_FAX_WORK, 4);
		TypeEnumMapper.getPhoneEnumMap().put(DataSubType.PHONE_HOME, 1);
		TypeEnumMapper.getPhoneEnumMap().put(DataSubType.PHONE_MOBILE, 2);
		TypeEnumMapper.getPhoneEnumMap().put(DataSubType.PHONE_OTHER, 7);
		TypeEnumMapper.getPhoneEnumMap().put(DataSubType.PHONE_PAGER, 6);
		TypeEnumMapper.getPhoneEnumMap().put(DataSubType.PHONE_WORK, 3);

		TypeEnumMapper.getEmailEnumMap().put(DataSubType.EMAIL_HOME, 1);
		TypeEnumMapper.getEmailEnumMap().put(DataSubType.EMAIL_MOBILE, 4);
		TypeEnumMapper.getEmailEnumMap().put(DataSubType.EMAIL_OTHER, 3);
		TypeEnumMapper.getEmailEnumMap().put(DataSubType.EMAIL_WORK, 2);

		TypeEnumMapper.getAddressEnumMap().put(DataSubType.ADDRESS_HOME, 1);
		TypeEnumMapper.getAddressEnumMap().put(DataSubType.ADDRESS_WORK, 2);
		TypeEnumMapper.getAddressEnumMap().put(DataSubType.ADDRESS_OTHER, 3);

		TypeEnumMapper.getImEnumMap().put(DataSubType.IM_PROTOCOL_AIM, 0);
		TypeEnumMapper.getImEnumMap().put(DataSubType.IM_PROTOCOL_MSN, 1);
		TypeEnumMapper.getImEnumMap().put(DataSubType.IM_PROTOCOL_YAHOO, 2);
		TypeEnumMapper.getImEnumMap().put(DataSubType.IM_PROTOCOL_SKYPE, 3);
		TypeEnumMapper.getImEnumMap().put(DataSubType.IM_PROTOCOL_QQ, 4);
		TypeEnumMapper.getImEnumMap().put(DataSubType.IM_PROTOCOL_GOOGLE_TALK, 5);
		TypeEnumMapper.getImEnumMap().put(DataSubType.IM_PROTOCOL_ICQ, 6);
		TypeEnumMapper.getImEnumMap().put(DataSubType.IM_PROTOCOL_JABBER, 7);
		TypeEnumMapper.getImEnumMap().put(DataSubType.IM_PROTOCOL_NETMEETING, 8);

		TypeEnumMapper.getOrganizationEnumMap().put(DataSubType.ORGANIZATION_WORK, 1);
		TypeEnumMapper.getOrganizationEnumMap().put(DataSubType.ORGANIZATION_OTHER, 2);

		TypeEnumMapper.getWebsiteEnumMap().put(DataSubType.WEBSITE_HOMEPAGE, 1);
		TypeEnumMapper.getWebsiteEnumMap().put(DataSubType.WEBSITE_BLOG, 2);
		TypeEnumMapper.getWebsiteEnumMap().put(DataSubType.WEBSITE_PROFILE, 3);
		TypeEnumMapper.getWebsiteEnumMap().put(DataSubType.WEBSITE_HOME, 4);
		TypeEnumMapper.getWebsiteEnumMap().put(DataSubType.WEBSITE_WORK, 5);
		TypeEnumMapper.getWebsiteEnumMap().put(DataSubType.WEBSITE_FTP, 6);
		TypeEnumMapper.getWebsiteEnumMap().put(DataSubType.WEBSITE_OTHER, 7);

		TypeEnumMapper.getEventEnumMap().put(DataSubType.EVENT_ANNIVERSARY, 1);
		TypeEnumMapper.getEventEnumMap().put(DataSubType.EVENT_OTHER, 2);
		TypeEnumMapper.getEventEnumMap().put(DataSubType.EVENT_BIRTHDAY, 3);

	}

	public static HashMap<Integer, DataSubType> getEmailTypeMap() {
		return TypeEnumMapper.emailTypeMap;
	}

	public static HashMap<Integer, DataSubType> getPhoneTypeMap() {
		return TypeEnumMapper.phoneTypeMap;
	}

	public static HashMap<Integer, DataSubType> getAddressTypeMap() {
		return TypeEnumMapper.addressTypeMap;
	}

	public static HashMap<Integer, DataSubType> getImTypeMap() {
		return TypeEnumMapper.imTypeMap;
	}

	public static HashMap<Integer, DataSubType> getOrganizationTypeMap() {
		return TypeEnumMapper.organizationTypeMap;
	}

	public static HashMap<Integer, DataSubType> getWebsiteTypeMap() {
		return TypeEnumMapper.webSiteTypeMap;
	}

	public static HashMap<Integer, DataSubType> getEventTypeMap() {
		return TypeEnumMapper.eventTypeMap;
	}

	public static HashMap<DataSubType, Integer> getEmailEnumMap() {
		return emailEnumMap;
	}

	public static HashMap<DataSubType, Integer> getPhoneEnumMap() {
		return phoneEnumMap;
	}

	public static HashMap<DataSubType, Integer> getAddressEnumMap() {
		return addressEnumMap;
	}

	public static HashMap<DataSubType, Integer> getImEnumMap() {
		return imEnumMap;
	}

	public static HashMap<DataSubType, Integer> getOrganizationEnumMap() {
		return organizationEnumMap;
	}

	public static HashMap<DataSubType, Integer> getEventEnumMap() {
		return eventEnumMap;
	}

	public static HashMap<DataSubType, Integer> getWebsiteEnumMap() {
		return webSiteEnumMap;
	}
}
